//package com.allwees.bs.c.common.auth;
//
//import org.springframework.http.HttpMethod;
//import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
//import org.springframework.security.web.util.matcher.RequestMatcher;
//
//import java.util.ArrayList;
//import java.util.List;
//
///**
// * @see org.springframework.security.config.annotation.web.AbstractRequestMatcherRegistry.RequestMatchers
// * 以上类为springsecurity内部私有类，无奈只能复制其部分源码成为本工具类
// *
// * @author yangylsky
// * @since 2019-11-08
// *
// */
//public class RequestMatcherBuilder {
//	private List<RequestMatcher> requestMatchers = new ArrayList<>();
//
//	public static RequestMatcherBuilder builder() {
//		return new RequestMatcherBuilder();
//	}
//
//	public List<RequestMatcher> build() {
//		return requestMatchers;
//	}
//
//	public RequestMatcherBuilder antMatchers(String... antPatterns) {
//		antMatchers(null, antPatterns);
//		return this;
//	}
//
//	public RequestMatcherBuilder antMatchers(HttpMethod httpMethod,
//			String... antPatterns) {
//		String method = httpMethod == null ? null : httpMethod.toString();
//		List<RequestMatcher> matchers = new ArrayList<>();
//		for (String pattern : antPatterns) {
//			matchers.add(new AntPathRequestMatcher(pattern, method));
//		}
//		requestMatchers.addAll(matchers);
//		return this;
//	}
//}
